[DO NOT MERGE] refactor(sdk): network layer foundations — break cycles, single isServer, logging discipline - #1519
Draft
cyaiox wants to merge 1 commit into
Draft
[DO NOT MERGE] refactor(sdk): network layer foundations — break cycles, single isServer, logging discipline#1519cyaiox wants to merge 1 commit into
cyaiox wants to merge 1 commit into
Conversation
…ver, logging discipline Phase 0 of the authoritative-server network refactor (pure enablement, no wire or public-API change; characterization suite green, all 13 defect pins still red): - constants.ts leaf module (AUTH_SERVER_PEER_ID, LIVEKIT_MAX_SIZE, DEBUG_NETWORK_MESSAGES, IProfile) dissolves all four import cycles rooted in message-bus-sync; re-exports keep old import paths working - runtime-context.ts: one isServer atom per transport instance; the duplicate module-scope atom and second ~system isServer call in network/index.ts are gone; Room drops its redundant isServerFuture - ecs-adapter.ts: the network layer's 22 deep @dcl/ecs/dist imports now route through one module (public-API promotion is a separate PR) - error logs un-gated from DEBUG in the server validator; stray always-on authoritative log re-gated; throw 1 replaced with Error; transport.onmessage! assertions replaced with a guarded deliver; fetchProfile rejection now caught and logged - observables.ts: add the six missing switch breaks (duplicate subscriber registrations); residual double-registration for the two shared-subscriber event pairs documented as a known ceiling - logger.ts: delete-entity messages serialized once (the redundant earlier branch removed, keeping types out of the Unknown bucket) - debugger statement removed from rendererTransport - snapshot goldens regenerated: metric lines only (bundle size ±0.1k, memory counters), ERR! grep clean Claude-Session: https://claude.ai/code/session_01Kzo6zwrn1CA79S4RN1dgsU
This was referenced Aug 5, 2026
Draft
Contributor
Test this pull request
|
cyaiox
marked this pull request as draft
August 5, 2026 14:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 0 of the authoritative-server network refactor (pure enablement,
no wire or public-API change; characterization suite green, all 13
defect pins still red):
DEBUG_NETWORK_MESSAGES, IProfile) dissolves all four import cycles
rooted in message-bus-sync; re-exports keep old import paths working
duplicate module-scope atom and second ~system isServer call in
network/index.ts are gone; Room drops its redundant isServerFuture
route through one module (public-API promotion is a separate PR)
always-on authoritative log re-gated; throw 1 replaced with Error;
transport.onmessage! assertions replaced with a guarded deliver;
fetchProfile rejection now caught and logged
subscriber registrations); residual double-registration for the two
shared-subscriber event pairs documented as a known ceiling
earlier branch removed, keeping types out of the Unknown bucket)
memory counters), ERR! grep clean
Claude-Session: https://claude.ai/code/session_01Kzo6zwrn1CA79S4RN1dgsU
🤖 Generated with Claude Code
https://claude.ai/code/session_01Kzo6zwrn1CA79S4RN1dgsU
📚 Stack (splits #1505 — merge top-down within each stack)
Network layer (each PR is one self-contained, independently-green commit):
sdk-commands (independent of the stack above):
After a parent squash-merges, the child needs
git rebase --onto origin/auth-server <old-parent> <child>— ping the session and it gets restacked.